<!DOCTYPE HTML>
<html>
    {{include file='template/frontend/includes/header.tpl'}}

    <body>
        {{include file='template/frontend/includes/top.tpl'}}
        <div id="wrapper">
            {{include file='template/frontend/includes/wrapper_header.tpl'}}
            <div id="navigation">
                {{include file='../../frontend/subs/main_menu.tpl'}}
            </div><!-- /Navigation-->
            <div id="wrap_content">
                {{if isset($data['chi-tiet-tin'])}}
                {{$detail = $data['chi-tiet-tin']}}
                {{if isset($category)}}
                    {{$url_map = $category->get_parent_category($detail->category_id)->code}}
                {{/if}}
                <h2 style="margin-top: 0;" class="title_box margin_bootm line_2px"><a href="{{'san-pham/'|cat:$url_map|cat:'/'|cat:$detail->category_code|base_url}}">{{$detail->category_title}}</a> / {{$detail->title|escape:'html'}}</h2>
                <div class="box wrap_img_info">
                    <ul class="detail-slide">
                        {{if $detail->img_detail_1!=''}}
                        <li><img width="641" height="362" src="{{$detail->img_detail_1|base_url}}" alt="" title="" /></li>
                        {{/if}}
                        {{if $detail->img_detail_2!=''}}
                        <li><img width="641" height="362" src="{{$detail->img_detail_2|base_url}}" alt="" title="" /></li>
                        {{/if}}
                        {{if $detail->img_detail_2!=''}}
                        <li><img width="641" height="362" src="{{$detail->img_detail_2|base_url}}" alt="" title="" /></li>
                        {{/if}}
                    </ul>
                    <div>
                        <div class="giao_hang">
                            <div class="icon_car">Giao sản phẩm</div>
                            <h2>{{$detail->title}}</h2>
                            <p>{{$detail->description|escape:'html'}}</p>
                        </div>
                        <div class="info_price">
                            <p>{{if $detail->old_price!=$detail->new_price}}<abbr>{{$detail->old_price|vnd_format:''}} VNĐ</abbr> &nbsp; - {{saleprice old_price=$detail->old_price new_price=$detail->new_price}}%{{/if}} <br /> <span>{{$detail->new_price|vnd_format:''}} VNĐ</span></p>
                            <a href="javascript:;" onclick="addItemToCart({{$detail->id}});"></a>
                        </div>
                    </div>
                </div>
                <div class="box details">
                    {{$detail->sub_content}}
                </div>
                <div class="box">
                    <div class="column_left">
                        <h2 style="text-align: center;">{{$detail->title|escape:'html'}}</h2>
                        {{$detail->content}}
                    </div>
                    <div class="column_right">
                        <div class="box wrap_pro wrap_prodetail">
                            {{if isset($data['tin-lien-quan'])}}
                            <ul>
                                {{foreach $data['tin-lien-quan'] as $item}}
                                {{if isset($category)}}
                                    {{$parent_code = $category->get_parent_category($item->category_id)->code}}
                                    {{$url = 'san-pham/'|cat:$parent_code|cat:'/'|cat:$item->category_code|cat:'/'|cat:$item->code}}
                                {{/if}}
                                <li>
                                    <a href="{{$url|base_url}}"><img src="{{$item->img_detail_1|base_url}}" title="{{$item->title}}"></a>
                                    <div class="price_list">{{if $item->old_price!=$item->new_price}}<span>{{$item->old_price|vnd_format:''}}<sup>đ</sup></span> | {{/if}}{{$item->new_price|vnd_format:''}}<sup>đ</sup></div>
                                    <p class="name_pro"><a href="{{$url|base_url}}">{{$item->title|escape:'html'}}</a></p>
                                    <p class="summary">{{$item->description|truncate:75:'...'|escape:'html'}}</p>
                                    <div class="wrap_btn top"><a href="javascript:;" onclick="addItemToCart({{$item->id}});" class="btn_add"></a><a class="btn_info"></a></div>
                                    {{if $item->old_price!=$item->new_price}}<div class="sale small list"><span>Giảm <abbr>{{saleprice old_price=$item->old_price new_price=$item->new_price}}%</abbr></span></div>{{/if}}
                                </li>
                                {{/foreach}}
                            </ul>
                            {{/if}}
                        </div>
                        <div class="clr"></div>
                    </div>
                </div>
                <div class="clr"></div>
                
            {{/if}}
            {{include file='template/frontend/includes/footer.tpl'}}
        
    </body>
</html>